import { createStore } from "vuex";

export default createStore({
  state: {
    count: 0,
    isLogin: false,
  },
  mutations: {
    increment(state) {
      state.count++;
      console.log(state.count);
    },
    isLogin(state, payload) {
      //简单的登录
      console.log(payload);
      if (payload) {
        state.isLogin = payload;
      }
    },
  },
  actions: {},
  modules: {},
});
